function beforeRoute(router) {
  router.beforeEach((to, from, next) => {
    document.title = to.meta.title
    if (to.meta.auth) { // 如果需要验证
      window.Tls.login().then(()=>{
        next()
      }).catch(()=>{
        next({
          path: '/login'
        })
      })

    } else {
      next()
    }

  })

}



export default beforeRoute
